<form class="layui-form">
  <div class="layui-form-item">
    <label class="layui-form-label">分类标题</label>
    <div class="layui-input-block">
      <input type="text" name="cat_title" lay-verify="required" placeholder="请输入分类标题" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">上级分类</label>
    <div class="layui-input-block">
        <select name="parent_id" placeholder="请选择上级分类" >
          <{volist name="catlist" id="v"}>
              <option value="<{$v.id}>"><{for start="0" end="$v.depath"}>&nbsp;&nbsp;&nbsp;&nbsp;<{/for}>|-<{$v.cat_title}></option>
          <{/volist}>
        </select>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit="" lay-filter="form">立即提交</button>
    </div>
  </div>
</form>
<script>
$().ready(function(){
layui.form.render('select');
});
</script>
